package com.qtenv.datasync.service.controller;


import com.qtenv.datasync.base.Result;
import com.qtenv.datasync.service.service.BasicDyhService;
import com.qtenv.datasync.utils.CustomUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 信息统计表_大用户 前端控制器
 * </p>
 *
 * @author CBL
 * @since 2022-08-09
 */
@RestController
@RequestMapping("/basic/dyh")
public class BasicDyhController {
    @Autowired
    private BasicDyhService basicDyhService;

    @GetMapping("/getSeniorTagInfo")
    public Result<?> getSeniorTagInfo(@RequestParam("tenantId") String tenantId, @RequestParam("areaId") String areaId) {
        String[] keyArr = {"大用户名称", "用户名称", "客户地址", "所属行业", "口径", "负责人"};
        String[] valueArr = {"areaName", "userName", "userAddress", "userTrade", "caliber", "director"};
        return Result.ok(CustomUtil.transformZbxToTextValueList(basicDyhService.getSeniorTagInfo(tenantId, areaId), keyArr, valueArr));
    }

}
